package com.lee.mysql;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * 启动完成自动执行
 */

@Component
public class ExecuteTask implements ApplicationRunner {
    private static final Logger log = LoggerFactory.getLogger(ExecuteTask.class);


    @Override
    public void run(ApplicationArguments args) throws Exception {
        log.info("启动完成自动执行-开始执行任务...");

        // 这里调用需要启动完成自动执行的代码......

        log.info("启动完成自动执行-任务执行完成!!!");
    }
}
